package com.ie.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ie.entity.Pets;
import com.ie.service.PetsService;
import com.ie.mapper.PetsMapper;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author admin
* @description 针对表【pets】的数据库操作Service实现
* @createDate 2025-03-02 22:16:12
*/
@Service
public class PetsServiceImpl
    implements PetsService {
@Resource
private PetsMapper petsMapper;
    @Override
    public List<Pets> getAllPets() {

        return petsMapper.getAllPets();
    }

    @Override
    public boolean updatePets(Integer id, String status) {

        return petsMapper.updatePets(id,status);
    }

    @Override
    public List<Pets> searchPets(String petname) {

        return petsMapper.searchPets(petname);
    }

    @Override
    public boolean addPets(Pets pets) {

        return petsMapper.add(pets) > 0;
    }

    @Override
    public boolean updateApply(Integer id, String username) {

        return petsMapper.updateApply(id,username);
    }

    @Override
    public List<Pets> getPets(String username) {

        return petsMapper.getPets(username);
    }

    @Override
    public boolean cancelApply(Integer id, String username) {

        return petsMapper.cancelApply(id,username);
    }
}




